1. Field of the Invention
The invention relates in general to an Ethernet switching method and an apparatus for networked communication. In particular, the invention relates to a method and an apparatus for data storage in and search of an address table of an Ethernet switch for computer networks.
2. Description of the Related Art
An Ethernet switch can be considered to be a type of active hub device used for transceiving networking data in an Ethernet-based computer networking environment. According to the Ethernet protocol, 48 bits of memory space is assigned for specifying each set of processed network addressing information. For each set of network addressing information processed, 48 bits out of the 64-bit network addressing word stored in an address table is taken up by the network address.
In addition to the 48-bit network address, the Ethernet standard generally specifics a port number, an age parameter, and a set of control bits for each of the processed 64-bit network addressing words, totaling 16 of the 64 bits in the information word. As is well known in the art, the port number identifies the particular one of the multiple ports of an Ethernet switch device to which the particular network data is destined, while the age parameter and control bits implement the substantial network data word transmission to and reception from its identified destination.
For the purpose of describing the method and apparatus of the invention for data storage and search in an address table of an Ethernet switching device, the block diagram of FIG. 1, showing the structural configuration of a typical Ethernet switching device, is briefly examined.
As shown in the drawing, the Ethernet switching device includes a total of four ports identified as PORT#0, PORT#1, PORT#2 and PORT#3. These ports are utilized to connect to a maximum of four network nodes in one or more Ethernet networks. Such connections are made for implementing data transceiving between every selected pair of the network nodes connected. As persons skilled in the art can well appreciate, the total number of ports provided in an Ethernet switching device, such as the device depicted in FIG. 1, is not necessarily limited to four. More than four ports may be provided in practical applications in a normal networking environment. Further, each of the connected network node devices, either a computer system or other peripheral device (such as a printer), may not necessarily be in the same physical network as any other node device that is also tied to the very Ethernet switching device.
The exemplified Ethernet switching device of FIG. 1 includes four subsystems 1, 2, 3 and 4, each for the corresponding one of the four ports. Each subsystem includes a set of logic, for example, subsystem 1 includes a media access controller (MAC) 12, a routing means 14, and an address table 16. The Ethernet switching device further includes a switch means 5 topologically located at the center of the device that facilitates the switching of information between any two of the network nodes which may be connected to any two of the four ports PORT#0-PORT#3. Essentially, the media access controller MAC 12 is responsible for implementing the transmission and reception of the network data to and from the port connected thereto. The routing means 14, on the other hand, is used to provide the necessary control signals to the switch means 5 for determining to which of the four ports the data should be sent. The address table 16 is utilized to hold the information needed by the routing means 14.
Referring to FIG. 2 of the drawing, there is shown a block diagram schematically illustrating the interaction between the routing means 14 and the address table 16 of an Ethernet switching device. The routing means 14 generally comprises a destination address register (DA Reg.) 142, a hash means 144, and a control means 146. The DA register 142 is a 48-bit memory device that receives and holds the destination address of the processed network data as provided by the MAC 12 of FIG. 1. The destination address is relayed to the hash means 144 for producing a 12-bit address that is compared with entries in the address table 16.
The hash means 144 is a logic means that implements a sort of compression scheme by chopping off portions of the 48-bit destination address of the processed network data. This hashing effectively reduces the size of the 48-bit destination address to a representative 12-bit address. Based on this reduced-size address information, one single corresponding 64-bit set of data can be located in the address table 16, which comprises a total of, for example, 4K (4096) entries of network address information. The corresponding located entry of 64-bit network address information can then be relayed back to the routing means 14 and processed by the control means 146 for its output to the switching means 5 of FIG. 1.
Each set of the 64-bit network address information held in the address table 16, based on the Ethernet standard, comprises a data format such as is shown in FIG. 3. Essentially, in addition to the 48-bit network address field NET.sub.-- ADDR, there are a network processing control information field CONTROL, an age information field AGE, and a port number field PORT.sub.-- NO. These three information fields together take up 16 bits of the 64-bit network address information comprising the network information as depicted in the drawing.
Therefore, the 64-bit network address information entry, as retrieved from the address table 16 based on the hashed 12-bit address, comprises a total of four fields, CONTROL, AGE, PORT.sub.-- NO and NET.sub.-- ADDR. Thus, its network address field NET.sub.-- ADDR constitutes the single correspondence with the original 48-bit destination address as issued by the MAC 12 of FIG. 1. This network address information retrieval from the address table 16, utilizing the hashed 12-bit address, is based on the implementation of a comparison operation. The comparison is performed by comparing the 12-bit hashed address with the network address field NET.sub.-- ADDR of the entries in the address table 16.
When one and only one match is produced as the result of the comparison, the corresponding 64-bit network address information can be elected and treated as the information mapped by the destination address information held in the DA register 142. The other parameters contained in the other three information fields of this matched data entry, CONTROL, AGE and PORT.sub.-- NO, can be used as the information for carrying out the network data routing. For example, the port number information PORT.sub.-- NO can be used to determine which of the four connection ports of the device of FIG. 1 should be elected to relay the network data. As can be observed in the drawing of FIG. 2, this is done by the control means 146 of the routing means 14, which relays the elected 64-bit network address information directly to the switch means 5 of FIG. 1.
If, however, no conformity is found between any entry of the 4K 64-bit address table 16 and the hashed 12-bit address as issued by the hash means 144, a determination is made that there is no network address having a connection tie with the current Ethernet switching device. In this case, the processed network data is broadcast to every one of the connection ports of the switching device.
Thus, in accordance with the Ethernet standard, in an Ethernet switching device employed as, for example, an active hub device for a networking environment, each set of the processed network addressing information takes up a total of 48 bits of memory space. For each network addressing word processed in the network environment, these 48 bits form a considerably large portion of the 64-bit word. This requires that the memory space for the other network processing parameters to be relatively small, and makes performance by the system of more advanced and complex network operations more difficult.